<%@page import="com.itwill.ecom.boardQnAReply.BoardQnAReplyServiceImpl"%>
<%@page import="java.util.List"%>
<%@page import="com.itwill.ecom.boardQnA.BoardQnABeans"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="org.springframework.web.context.WebApplicationContext"%>
<%@page import="com.itwill.ecom.boardQnA.BoardQnAServiceImpl"%>
<%@page import="com.itwill.ecom.boardQnA.BoardQnAService"%>

<%@page import="java.util.ArrayList"%>

<%@ page language="java" contentType="text/plain; charset=utf-8"
    pageEncoding="utf-8"%>
<%

/////////////// 리스트 호출 시 이곳에서 리스트 정보를 받아서 뿌려준다.. ////////////////
/////////////// 뿌려줄 정보는 게시판 no,nickname,title 정보만 보내준다 //////////////

WebApplicationContext webContext = WebApplicationContextUtils.getWebApplicationContext(application);
BoardQnAServiceImpl boardQnAService=(BoardQnAServiceImpl)webContext.getBean("boardQnAService");

int no=Integer.parseInt(request.getParameter("no"));

String v1 = request.getParameter("v1");
String v2 = request.getParameter("v2");
if ((v1 == null|| v1.equals(""))||(v2 == null|| v2.equals(""))){
	v1 = "";
	v2 = "";
}
String method = request.getMethod();
System.out.println("*********jQuery Ajax요청정보*********");
System.out.println("0.jQuery Ajax요청URL    :" + request.getRequestURI());
System.out.println("1.jQuery Ajax요청방식    :" + method);
System.out.println("2.jQuery Ajax요청파라메타:" + v1+','+v2);
System.out.println("*************************************");


List<BoardQnABeans> boardQnAList =boardQnAService.getAllBoardQnA();
%>
[
<%
for(int i=1*no;i<10*no;i++){
	int list_no=0;
	BoardQnABeans boardQnABeans=boardQnAList.get(i);
	no=no+1;
%>

{
"list_no":"<%=no%>",
"qnaboard_no":"<%=boardQnABeans.getQnaboard_no()%>",
"qnaboard_nickname":"<%=boardQnABeans.getQnaboard_nickname()%>",
"qnaboard_title":"<%=boardQnABeans.getQnaboard_title()%>"

}
<%
if((i+1)!=boardQnAList.size())
	out.print(",");
}
%>
]








